import '../../amap.dart';

mixin LocationMixin on NativeMessenger {
  ///获取当前位置
  Future<MapLocation> getMyLocation() async {
    final myLocation = await sendMessageToNative('getMyLocation');
    if (myLocation.success && myLocation.data != null) {
      return MapLocation.fromJson(myLocation.data);
    }
    return null;
  }
}
